package com.zjw.service.impl;

import com.zjw.dao.TradeLogDao;
import com.zjw.dao.impl.TradelogDaoImpl;
import com.zjw.entity.TradeLog;
import com.zjw.service.TradeLogService;
import com.zjw.utils.ConnectionUtil;
import com.zjw.vo.TradeLogDetail;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * 交易记录表(Tradelog)表服务实现类
 *
 * @author 翟
 * @since 2025-04-09 08:59:19
 */
public class TradeLogServiceImpl implements TradeLogService {

    @Override
    public List<TradeLogDetail> findAll() {
        Connection connection = ConnectionUtil.getConnection();
        TradeLogDao tradeLogDao = new TradelogDaoImpl(connection);
        try {
            return tradeLogDao.selectAll();
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            ConnectionUtil.closeALL(null , null , connection);
        }
        return null;
    }
}
